package com.neiquan.secondhand.po;

import com.neiquan.backstage.core.PO;
import com.neiquan.backstage.core.bsc.CRUD;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.security.KeyStore;
import java.util.Date;

/**
 *  订单表
 *  chenjunnan 
 *  2016/7/21.
 */
@Entity
@org.hibernate.annotations.Entity(selectBeforeUpdate = true, dynamicUpdate = true)
@Table(name = "sh_order")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@CRUD
public class Order extends PO  {
	 @Override
	    public Serializable getId() {
	        return null;
	    }
    @Id
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "uuid.hex")
    
    @Column(name = "id", unique = true, nullable = false)
    private String id;//主键
    
    @Column(name = "userid", length=200,nullable = false)
    private String userid;//用户id
    
    @Column(name = "user_name", length=200)
    private String userName;//用户名称
    
    @Column(name = "telephone", length=20)
    private String telephone;//手机号
    
    @Column(name = "phone", length=20)
    private String phone;//电话
    
    @Column(name = "email", length=20)
    private String email;//邮箱
    
    @Column(name = "goods_id", length=200)
    private String goodsId;//商品Id
    
    @Column(name = "title", length=200)
    private String title;//商品标题
    
    @Column(name = "goods_img_id", length=11)
    private String goodsImgId;//商品图片
    
    @Column(name = "address",length=500)
    private String address;//详细地址

    @Column(name = "order_num",length=200)
    private String orderNum;//订单编号
    
    @Column(name = "price",  precision = 2) 
    private Double price;//原价

    @Column(name = "real_pay",precision = 2)
    private Double realPay;//实付
    
    @Column(name = "deliver_price",precision = 2)
    private Double deliverPrice;//运费
    
    @Column(name = "deliver_name",length=200)
    private String deliverName;//快递名称
    
    @Column(name = "status",length=1)
    private  Integer status;//状态 0：待付款，1：待发货，2,：待收货，3：已完成
    
    @Column(name = "deliver_number",length=200)
    private String deliverNumber;//运单号
    
    @Column(name = "deal_time")
    private  Long dealTime;//成交时间
    
    @Column(name = "create_time")
    private  Long createTime;//创建时间

    @Column(name = "flag")
    private  Integer flag;//删除状态 0：删除，1：正常

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(String goodsId) {
		this.goodsId = goodsId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getGoodsImgId() {
		return goodsImgId;
	}

	public void setGoodsImgId(String goodsImgId) {
		this.goodsImgId = goodsImgId;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(String orderNum) {
		this.orderNum = orderNum;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Double getRealPay() {
		return realPay;
	}

	public void setRealPay(Double realPay) {
		this.realPay = realPay;
	}

	public Double getDeliverPrice() {
		return deliverPrice;
	}

	public void setDeliverPrice(Double deliverPrice) {
		this.deliverPrice = deliverPrice;
	}

	public String getDeliverName() {
		return deliverName;
	}

	public void setDeliverName(String deliverName) {
		this.deliverName = deliverName;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getDeliverNumber() {
		return deliverNumber;
	}

	public void setDeliverNumber(String deliverNumber) {
		this.deliverNumber = deliverNumber;
	}

	public Long getDealTime() {
		return dealTime;
	}

	public void setDealTime(Long dealTime) {
		this.dealTime = dealTime;
	}

	public Long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}

	public Integer getFlag() {
		return flag;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}

	public void setId(String id) {
		this.id = id;
	}

	
    
    
   
	

}
